package cn.tedu.clyback.font.controller;

import cn.tedu.clyback.font.pojo.param.CaculateParam;
import cn.tedu.clyback.font.pojo.vo.CaculateVO;
import cn.tedu.clyback.base.response.JsonResult;
import cn.tedu.clyback.font.service.CaculateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@Slf4j
@RequestMapping("guesslucky/")
public class CaculateController {
    @Autowired
    private CaculateService caculateService;

    @PostMapping("phone/select")
    public JsonResult selectByPhoneNumber( CaculateParam caculateParam){
        log.debug("预测接收到请求参数：{}",caculateParam);
        CaculateVO resulat=caculateService.selectByPhoneNumber(caculateParam);
        log.debug("预测结果：{}",resulat);
        return JsonResult.ok(resulat);
    }
    @PostMapping("license/select")
    public JsonResult selectByLicense( CaculateParam caculateParam){
        log.debug("预测接收到请求参数：{}",caculateParam);
        CaculateVO resulat=caculateService.selectByLicense(caculateParam);
        log.debug("预测结果：{}",resulat);
        return JsonResult.ok(resulat);
    }
    @PostMapping("qqNumber/select")
    public JsonResult selectByqqNumber( CaculateParam caculateParam){
        log.debug("预测接收到请求参数：{}",caculateParam);
        CaculateVO resulat=caculateService.selectqqNumber(caculateParam);
        log.debug("预测结果：{}",resulat);
        return JsonResult.ok(resulat);
    }
    @PostMapping("wechatNumber/select")
    public JsonResult selectBywechatNumber( CaculateParam caculateParam){
        log.debug("预测接收到请求参数：{}",caculateParam);
        CaculateVO resulat=caculateService.selectwechatNumber(caculateParam);
        log.debug("预测结果：{}",resulat);
        return JsonResult.ok(resulat);
    }
}
